<%--
  Created by IntelliJ IDEA.
  User: 秋梓
  Date: 2021/11/28
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>Title</title>
</head>
<body>
<span class="shop-title" onclick="window.location.href='http://localhost:8080/JavaBookShop/IndexServlet'">
    JavaBookShop图书商城</span> | <a href="BackStageServlet">书城维护</a> | <a href="UserManageServlet">用户管理</a>
<c:if test="${empty sessionScope.user}">
    (当前状态：未登录)
    <a href="login.jsp">登录</a> | <a href="register.jsp">注册</a>
</c:if>
<c:if test="${!empty sessionScope.user}">
    (当前登录用户： <c:out value="${sessionScope.user.getUsername()}"/>)
    <a href="LogoutServlet">注销</a>
</c:if>
</body>
</html>
<style>
    .shop-title{
        font-size: 20px;
        font-weight: bolder;
    }
</style>